def load_data(fp):
    src, tgt = [], []
    with open(fp, 'r') as fpair:
        for pair in fpair:
            x, y = pair.strip().split('\t')
            src.append(x)
            tgt.append(y)
    return src, tgt
def store(fp, x):
    with open(fp, 'w') as fout:
        for data in x:
            fout.write(data+'\n')
if __name__ == "__main__":
    fin = './data/fra2eng/fra_eng.dev'
    fout_post = './data/fra2eng/post.dev'
    fout_resp = './data/fra2eng/resp.dev'
    src, tgt = load_data(fin)
    store(fout_post, src)
    store(fout_resp, tgt)
